package com.company.编译原理.work1;

import com.company.编译原理.DFA.DFA;

import java.io.*;
import java.nio.file.Path;

/**
 * @ClassName work1
 * @Description TODO
 * @Author 11
 * @Date 2021/3/29 13:55
 * @Version 1.0
 */
public class work1 {
    public static void main(String[] args) {
        StringBuffer stringBuffer = new StringBuffer();
        BufferedReader reader = null;
        BufferedWriter writer = null;
        try {


//            Path outPath =


            writer = new BufferedWriter(new FileWriter("F:\\workProject\\interview-questions\\javacode\\src\\main\\java\\com\\company\\编译原理\\work1\\out.txt"));
            reader= new BufferedReader(new FileReader("F:\\workProject\\interview-questions\\javacode\\src\\main\\java\\com\\company\\编译原理\\DFA\\test.txt"));
            String tempStr;
            while ((tempStr = reader.readLine()) != null) {
                stringBuffer.append(tempStr);
            }
            reader.close();
            writer.write(stringBuffer.toString());
            writer.flush();
            writer.close();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            if (reader != null||writer!=null) {
                try {
                    reader.close();
                    writer.close();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
        }
    }
}
